<?php

class Application_Form_Addcartridges extends Zend_Form {

    public function init() {
	
	$printersMapper = new Application_Model_Printers;
	
	$this->setAction('/printers/addcartridge');
	$this->setMethod('post');

	$this->addElement('text', 'name', array(
	    'label' => 'Модель картриджа: ',
	    'required' => true,
	    'maxLength' => 255
	));

	
	$this->addElement('text', 'stock', array(
	    'label' => 'Количество на склалде: ',
	    'required' => false,
	    'maxLength' => 5,
	    'filters' => array('int')
	));
	
	$this->addElement('select', 'color', array(
	    'label' => 'Цвет: ',
	    'required' => true,
	    'multiOptions'=> $printersMapper->getColors()
	));

	$this->addElement('submit', 'submit', array(
	    'label' => 'Добавить'
	));
    }

}

